<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>

<!DOCTYPE html>
<html class="x-admin-sm">
  
  <head>
    <meta charset="UTF-8">
    <title>修改文章状态</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="stylesheet" href="./css/font.css">
    <link rel="stylesheet" href="./css/index.css">
    <script type="text/javascript" src="./lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="./js/index.js"></script>

  </head>
  
  <body>
 	<div>
 	 
 	</div>
    <div class="layui-fluid">
        <div class="layui-row">
            
            <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" onclick="location.reload()" title="刷新">
        	<i class="layui-icon layui-icon-refresh" style="line-height:30px"></i></a>
        	
        	
        	<form action="" method="post" class="layui-form layui-form-pane" >
                 <div class="layui-form-item layui-form-text" id="content">
                 
                 </div>
                 </form>
             
            
        </div>
    </div>
<script type="text/javascript" src="js/jquery.min.js"></script>
<script type="text/javascript" src="js/jquery.js"></script>
<script>

  let pageNum=1;
  let pageSize=5;
  queryAnnounce();
  function  queryAnnounce(){
  $.ajax({
		async:true,
		type:"post",
		url:"${pageContext.request.contextPath}/AdminOperateArticleServlet",
		data:{
			op:"queryArticleById",
			pageNum:1,
			pageSize:1,
			identity:"uu",
			articleId:"${param.articleId}"
		},
		contentType:"application/x-www-form-urlencoded",
		dataType:"json",
		success:function(articleId,status,xhr){
			var temp = ``;
			if(articleId != null){
					//console.log(articleId.articleTitle);
					temp +=`
						<label for="desc" class="layui-form-label" >
	                       公告标题
	                    </label>
	                    <div class="layui-input" id="title">
	                        <text placeholder="\${articleId.articleTitle}" id="desc" name="desc" class="layui-textarea" >\${articleId.articleTitle}</text>
	                    </div>
	                    </div>
	                    <br>
	                     <div class="layui-form-item layui-form-text" id="authorname">
	                      <label for="desc" class="layui-form-label">
	                       发布者
	                    </label>
	                    <div class="layui-input">
	                        <text placeholder="" id="desc" name="desc" class="layui-textarea">\${articleId.user.userName}</text>
	                    </div>
	                </div>
	                <div class="layui-form-item layui-form-text">
	                    <label for="desc" class="layui-form-label" id="content">
	                       公告内容
	                    </label>
	                    <div class="layui-input-block">
	                        <text placeholder="\${articleId.articleTitle}" id="desc" name="desc" class="layui-textarea" >\${articleId.articleContents}</textarea>
	                    </div>
	                </div>
	                <div class="layui-form-item layui-form-text">
	                    <label for="desc" class="layui-form-label">
	                        更改状态原因
	                    </label>
	                    <div class="layui-input-block">
	                        <textarea placeholder="请输入内容" id="desc" name="desc" class="layui-textarea"></textarea>
	                    </div>
	                </div>
	                <div class="layui-form-item">
	                <button class="layui-btn" lay-submit="" lay-filter="">封禁该公告</button>
	                <button class="layui-btn" lay-submit="" lay-filter="">解封该公告</button>
	                
					</div>
	                    
						 `;
					
				
				
			}
			$("#content").html(temp);
			
		}
		
				
  });
  
  };
  //
</script>	
</body>				
</html>